import {OnInit, Component} from "@angular/core";
import {Observable} from "rxjs";
import {ActivatedRoute} from "@angular/router";

@Component({
  selector: 'crisis-admin',
  templateUrl: 'app/crisis-center/crisis-admin.component.html'
})
export class CrisisAdminComponent implements OnInit {
  sessionId: Observable<string>
  token: Observable<string>

  constructor(private route: ActivatedRoute) {
  }

  ngOnInit() {
    this.sessionId = this.route.queryParams.map(params =>
      params['session_id'] || 'None'
    )
    this.token = this.route.fragment.map(
      fragment=> fragment || 'None'
    )
  }
}